package info.wf0913.blogger_service.web;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/*设置页面自动跳转
* */
@Configuration
public class WebServerltConfig implements WebMvcConfigurer {

    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        //拦截请求，/ 跳转到templates 目录下的index.html
        registry.addViewController("/").setViewName("index");
    }
}
